package eu.dominicum.ft.pd.mao.validator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Validation annotation to validate the properties personID and person.
 *
 * @author Harry Klerks
 * @since 2013M1
 */
@Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = NewOrExistingPersonValidator.class)
@Documented
public @interface NewOrExistingPerson {

    String message() default
            "Als er geen bestaande Persoon is geselecteerd dan moet er een nieuwe worden gemaakt";

    Class<?>[] groups() default {};

    /**
     * .
     *
     * @return Class<? extends Payload>[]
     */
    Class<? extends Payload>[] payload() default {};

}
